package com.myway.dto.pricing;

import java.io.Serializable;

/**
 * @author Stanley
 * @version 1.0
 * @created 16-May-2008 10:44:56 AM
 * 
 * <pre>
 * Maintenance History
 * ===================
 * 2009-05-18	Stanley			Add market fare (票面价) attribute. Before this the cabin fare was displayed as market fare. 
 * 								For certain products like YCDJ, CDJ, the market fare should be the product fare.
 * </pre>
 */
public class DTOFare implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8321537813381048959L;
	/**
	 * farePrice: 销售价格 
	 */
	private double farePrice = 0;
	/**
	 * marketFare: 市场价格 
	 */
	private double marketFare = 0;
	/**
	 * fuelSurcharge: 燃油费 
	 */
	private double fuelSurcharge = 0;
	/**
	 * airportTax: 机建费 
	 */
	private double airportTax = 0;
	/**
	 * otherCharges: 其它费用 
	 */
	private double otherCharges = 0;
	
	/**
	 * 所需西部招行联名卡积分
	 */
	private double pnCMBCardMile = 0;

	/**
	 * returnPoint: 返点积分 
	 */
	private double returnPoint =0;
	
	/**
	 *  the price of the refrence cabin 
	 *  参考舱位价格
	 */
	private double refrenceFare = 0;
	/**
	 * 规则编号 Policy under which this fare is offered. Value to be set by rules.
	 */
	private String policyNo;

	/**
	 * 备注 Additional information about this fare. Value to be set by rules.
	 */
	private String remark;

	/**
	 * commission: 代理费用（佣金） 
	 */
	private DTOCommission commission = new DTOCommission();

	public DTOFare() {

	}

	public void finalize() throws Throwable {
		super.finalize();
	}

	public double getFarePrice() {
		return farePrice;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setFarePrice(double newVal) {
		farePrice = newVal;
	}

	public double getFuelSurcharge() {
		return fuelSurcharge;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setFuelSurcharge(double newVal) {
		fuelSurcharge = newVal;
	}

	public double getAirportTax() {
		return airportTax;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setAirportTax(double newVal) {
		airportTax = newVal;
	}

	public double getOtherCharges() {
		return otherCharges;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setOtherCharges(double newVal) {
		otherCharges = newVal;
	}

	public double getTotal() {
		return farePrice + fuelSurcharge + airportTax + otherCharges;
	}

	public DTOCommission getCommission() {
		return commission;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Fare: ").append(farePrice).append("\n").append("Policy: " + policyNo).append("\n").append(
				"Fuel Surcharge: ").append(fuelSurcharge).append("\n").append("Airport Tax: ").append(
				airportTax).append("\n").append("Other Taxes: ").append(otherCharges).append("\n")
				.append("Commission: ").append(commission.toString())
				;

		return sb.toString();
	}

	public String getPolicyNo() {
		return policyNo;
	}

	public void setPolicyNo(String policyNo) {
		this.policyNo = policyNo;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public double getMarketFare() {
		return marketFare;
	}

	public void setMarketFare(double marketFare) {
		this.marketFare = marketFare;
	}

	
	/**
	 * @return the pnCMBCardMile
	 */
	public double getPnCMBCardMile()
	{
		return pnCMBCardMile;
	}

	
	/**
	 * @param pnCMBCardMile the pnCMBCardMile to set
	 */
	public void setPnCMBCardMile(double pnCMBCardMile)
	{
		this.pnCMBCardMile = pnCMBCardMile;
	}

	public double getReturnPoint() {
		return returnPoint;
	}

	public void setReturnPoint(double returnPoint) {
		this.returnPoint = returnPoint;
	}

	public double getRefrenceFare() {
		return refrenceFare;
	}

	public void setRefrenceFare(double refrenceFare) {
		this.refrenceFare = refrenceFare;
	}

	
}